#include<Mesh/Mesh_Operator.h>


#define quote lib_cell_quote
Mesh operator*(Mesh& m,double v)
{
    for(auto iter=m.v_begin(&m);iter!=m.v_end(&m);iter++)
    {
        for(int i=0;i<quote(iter)->point_size;i++)
        {
            quote(iter)->point[i]*=v;
        }
    }
    return m; 
}
Mesh operator+(Mesh&m,double* p)
{
    for(auto iter=m.v_begin(&m);iter!=m.v_end(&m);iter++)
    {
        for(int i=0;i<quote(iter)->point_size;i++)
        {
            quote(iter)->point[i]+=p[i];
        }
    }
    return m;
}

Mesh operator-(Mesh&m,double *p)
{
    for(auto iter=m.v_begin(&m);iter!=m.v_end(&m);iter++)
    {
        for(int i=0;i<quote(iter)->point_size;i++)
        {
            quote(iter)->point[i]-=p[i];
        }
    }
    return m;
}